package com.example.administrator.jingpingou.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2016/8/29.
 */
public class ThemeBean {
   private String iphoneimg;
   private String title;
    private String zid;

    @Override
    public String toString() {
        return "ThemeBean{" +
                "iphoneimg='" + iphoneimg + '\'' +
                ", title='" + title + '\'' +
                ", zid='" + zid + '\'' +
                '}';
    }

    public String getIphoneimg() {
        return iphoneimg;
    }

    public void setIphoneimg(String iphoneimg) {
        this.iphoneimg = iphoneimg;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getZid() {
        return zid;
    }

    public void setZid(String zid) {
        this.zid = zid;
    }
    //
//    /**
//     * data : [{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1472189016/","title":"这周买什么","zid":"955"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1472095597/","title":"开学爆到","zid":"954"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1472174301/","title":"数码","zid":"953"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1472015608/","title":"收拾","zid":"952"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471849413/","title":"精品汇","zid":"951"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471845935/","title":"爆品","zid":"950"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471586665/","title":"品质","zid":"949"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471582951/","title":"好货","zid":"948"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471421732/","title":"818全民发烧节","zid":"947"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471417262/","title":"宅家","zid":"946"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471412207/","title":"早秋尚新","zid":"945"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471255645/","title":"闺蜜","zid":"944"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1471252339/","title":"电脑周边","zid":"943"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1470997650/","title":"夏日扫货","zid":"942"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1470996293/","title":"囤货","zid":"941"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1470992863/","title":"搭配","zid":"940"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1470821643/","title":"男朋友","zid":"939"},{"iphoneimg":"http://image.repaiapp.com/spzt/images/list/iphone_1470817268/","title":"宅生活","zid":"938"}]
//     * info : success
//     */
//
//    private String info;
//    /**
//     * iphoneimg : http://image.repaiapp.com/spzt/images/list/iphone_1472189016/
//     * title : 这周买什么
//     * zid : 955
//     */
//
//    private List<DataBean> data;
//
//    public static ThemeBean objectFromData(String str) {
//
//        return new Gson().fromJson(str, ThemeBean.class);
//    }
//
//    public static ThemeBean objectFromData(String str, String key) {
//
//        try {
//            JSONObject jsonObject = new JSONObject(str);
//
//            return new Gson().fromJson(jsonObject.getString(str), ThemeBean.class);
//        } catch (JSONException e) {
//            e.printStackTrace();
//        }
//
//        return null;
//    }
//
//    public static List<ThemeBean> arrayThemeBeanFromData(String str) {
//
//        Type listType = new TypeToken<ArrayList<ThemeBean>>() {
//        }.getType();
//
//        return new Gson().fromJson(str, listType);
//    }
//
//    public static List<ThemeBean> arrayThemeBeanFromData(String str, String key) {
//
//        try {
//            JSONObject jsonObject = new JSONObject(str);
//            Type listType = new TypeToken<ArrayList<ThemeBean>>() {
//            }.getType();
//
//            return new Gson().fromJson(jsonObject.getString(str), listType);
//
//        } catch (JSONException e) {
//            e.printStackTrace();
//        }
//
//        return new ArrayList();
//
//
//    }
//
//    public String getInfo() {
//        return info;
//    }
//
//    public void setInfo(String info) {
//        this.info = info;
//    }
//
//    public List<DataBean> getData() {
//        return data;
//    }
//
//    public void setData(List<DataBean> data) {
//        this.data = data;
//    }
//
//    public static class DataBean {
//        private String iphoneimg;
//        private String title;
//        private String zid;
//
//        public static DataBean objectFromData(String str) {
//
//            return new Gson().fromJson(str, DataBean.class);
//        }
//
//        public static DataBean objectFromData(String str, String key) {
//
//            try {
//                JSONObject jsonObject = new JSONObject(str);
//
//                return new Gson().fromJson(jsonObject.getString(str), DataBean.class);
//            } catch (JSONException e) {
//                e.printStackTrace();
//            }
//
//            return null;
//        }
//
//        public static List<DataBean> arrayDataBeanFromData(String str) {
//
//            Type listType = new TypeToken<ArrayList<DataBean>>() {
//            }.getType();
//
//            return new Gson().fromJson(str, listType);
//        }
//
//        public static List<DataBean> arrayDataBeanFromData(String str, String key) {
//
//            try {
//                JSONObject jsonObject = new JSONObject(str);
//                Type listType = new TypeToken<ArrayList<DataBean>>() {
//                }.getType();
//
//                return new Gson().fromJson(jsonObject.getString(str), listType);
//
//            } catch (JSONException e) {
//                e.printStackTrace();
//            }
//
//            return new ArrayList();
//
//
//        }
//
//        public String getIphoneimg() {
//            return iphoneimg;
//        }
//
//        public void setIphoneimg(String iphoneimg) {
//            this.iphoneimg = iphoneimg;
//        }
//
//        public String getTitle() {
//            return title;
//        }
//
//        public void setTitle(String title) {
//            this.title = title;
//        }
//
//        public String getZid() {
//            return zid;
//        }
//
//        public void setZid(String zid) {
//            this.zid = zid;
//        }
//    }
}
